package com.hanklee.demo.utils

import org.java_websocket.handshake.ServerHandshake
import java.nio.ByteBuffer

interface RTSTWebSocketListener {
    fun onOpen(handshake: ServerHandshake)

    /**
     * @param action 识别结果的类型 started | result | error
     * @param message 识别结果的内容
     * @return
     */
    fun onMessage(action: String, message: String)
    fun onError(exception: Exception)
    fun onClose(code: Int, reason: String, remote: Boolean)
    fun onMessageBytes(bytes: ByteBuffer)
}